{include file="../app/common/admin/lib/header.html"  title="活动管理"}
<div class="inner-center-box">
  <div class="page-header clearfix">
    <h2 class="left">活动管理<span>在这里添加活动管理</span></h2>
    <a href='{:url("/activity/admin/index")}' class="btn btn-default btn-sm right">&lt;&nbsp;返回活动列表</a>
  </div>
<!--start:引导图新增-->
  <div class="add-form">
    <form class="js_creatForm"  action='{:url("/activity/admin/save")}' method="post" enctype="multipart/form-data">
      <input type="hidden" name="id" class="js_id" value="{$info.id}">
      <table class="table" cellpadding="0" cellspacing="0">

        <!--<tr>-->
          <!--<th><label for="" class="add-f-label">分类：</label></th>-->
          <!--<td>-->
          <!---->
            <!--<select name="info[category_id]" class="js_type">-->
              <!--<option value="0" >请选择分类</option>-->
              <!--{foreach $category_list as $k => $v}-->
                <!--<option value="{$v.id}" {if $info['category_id'] == $v.id}selected="selected"{/if}>{$v.title}</option>-->
              <!--{/foreach}-->
              <!---->
            <!--</select>{if !$category_list}<a href="{AnUrl('category/admin/add')}" class="tips">&nbsp;&nbsp;&nbsp;<span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>还没有分类， 去添加</a>{/if}-->
            <!--<div class="tips"><span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>请选择分类</div>-->
          <!--</td>-->
        <!--</tr>-->

        
        <tr>
          <th><label for="" class="add-f-label">标题：</label></th>
          <td>
            <input name="title"  value="{$info.title}" type="text" class="add-f-ipt1">
            <div class="tips"><span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>请输入标题</div>
          </td>
        </tr>
        <tr>
          <th><label for="" class="add-f-label">活动地址：</label></th>
          <td>
            <input name="content"  value="{$info.content}" type="text" class="add-f-ipt1">
            <div class="tips"><span style="line-height: 34px;color: #f00;margin-right: 10px;"></span>活动地址</div>
          </td>
        </tr>
        <!--<tr>-->
          <!--<th><label for="" class="add-f-label">简介：</label></th>-->
          <!--<td>-->
          <!--&lt;!&ndash; -->
            <!--<input name="info[intro]"  value="{$info.intro}" type="text" class="add-f-ipt1 js_replyContent">-->
             <!--&ndash;&gt;-->
            <!--<textarea name="info[intro]" class="add-f-ipt1 js_intro add-f-area js_replyContent">{$info.intro}</textarea>-->
            <!--<div class="tips"><div class="surplus js_fontNumBox">剩余<span class="js_replyContentNum">300</span>字题</div>-->
          <!--</td>-->
        <!--</tr>-->

        <!--<tr>-->
          <!--<th valign="top"><label for="" class="add-f-label">封面：</label></th>-->
          <!--<td class="perUpOuter">-->
            <!--<div class="clearfix">-->
              <!--<div class="btn-upload left">-->
                <!--<a href="javascript:void(0);"><i class="icon-upload"></i>上传图片</a>-->
                <!--<input class="js_upFile"  type="file" name="logo" {if $info.cover}is_logo="1" {else} is_logo="0"{/if}>-->
              <!--</div>-->
              <!--<span class="tips left">&nbsp;&nbsp;&nbsp;<span style="line-height: 34px;color: #f00;margin-right: 10px;">*</span>封面比例900*500</span>-->
            <!--</div>-->
            <!--<div class="js_upFileBox" {if !$info.cover}style="display:none;"{/if}>-->
                <!--{if $info.cover}<img src="{_image($info.cover, small)}" class="js_logoVal">{/if}-->
            <!--</div>-->
          <!--</td>-->
        <!--</tr>-->

        <!--<tr>-->
          <!--<th><label for="" class="add-f-label">活动地址：</label></th>-->
          <!--<td>-->
          <!---->
          <!--<textarea class="info[content]" name="info[content]" id="js_editor" style="width:490px;height:190px;">{$info.content}</textarea>-->
          <!--</td>-->
        <!--</tr>-->
        
        <tr><th>&nbsp;</th><td class="noborder"><button type="submit" class="btn btn-success js_submit" data-val="{$is_edit}">&nbsp;&nbsp;&nbsp;确认&nbsp;&nbsp;&nbsp;</button></td></tr>
      </table>
    </form>
  </div>
</div>


<!--{load_js file='ueditor1_2_6_1/ueditor.config.js'}-->
<!--{load_js file='ueditor1_2_6_1/ueditor.all.min.js'}-->



<script>
var id = "{$info.id}";
$(function(){  
  //初始化编辑器
  // var editor = new UE.ui.Editor('js_editor');
  //
  // editor.render("js_editor");
  
  function getContentNum()
  {
    
    $(".js_replyContent").each(function(){
      var num       = $.trim($(this).val().length);
      var remainNum = 300 - num;
      $(this).next().children().children('.js_replyContentNum').text(remainNum);
    });

  }
  
  getContentNum();
  //计算输入字数
  $(".js_replyContent").live("keyup", function(){
    var clickObj    = $(this);
    var content_num = $.trim(clickObj.val().length);
    if (content_num >= 300) {
      //showMsg("已超过最多字数");
      $(this).val($(this).val().substring(0,300));
      clickObj.next().children().children('.js_replyContentNum').text(0);
      return;
    }
    
    var remainNum = 300 - content_num;
    clickObj.next().children().children('.js_replyContentNum').text(remainNum);
    //setNum(clickObj, 300);
  })
  
  // 点击 表单提交按钮
  $('.js_submit').click(function(e){
    e.preventDefault();
    var title = $.trim($("input[name='title']").val());
    if (!title) {
      showMsg("请输入标题");
      return;
    }

      
    $('.js_creatForm').submit();

  });
  
  //上传图片预览
  $(".js_upFile").each(function(i){
    $(this).change(function(e){
      handleFileSelect($(this));
      $("input[name='logo']").attr("is_logo", "1");
    });
  });
});
</script>

{include file="../app/common/admin/lib/footer.html"}